import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/admin',
      name: 'admin',
      component: () => import('../views/admin/_layout.vue'),
      children: [
        {
          path: 'home',
          name: 'admin_Home',
          component: () => import('../views/admin/Home.vue')
        }
      ]
    },
   
    
    {
      path: '/',
      name: 'app',
      component: () => import('../views/app/_layout.vue'),
      children: [
        {
          path: 'home',
          name: 'appHome',
          component: () => import('../views/app/Home.vue'),
          meta: {
            isSider: true
          }
        },
        {
          path: 'article',
          name: 'appArticle',
          component: () => import('../views/app/Article.vue'),
          meta: {
            isSider: true
          }
        },
        {
          path: 'classification',
          name: 'appClassification',
          component: () => import('../views/app/Classification.vue'),
          meta: {
            isSider: true
          }
        },
        {
          path: 'tags',
          name: 'appTags',
          component: () => import('../views/app/Tags.vue'),
          meta: {
            isSider: true
          }
        },
        {
          path: 'search',
          name: 'appSearch',
          component: () => import('../views/app/Search.vue'),
          meta: {
            isSider: false
          }
        },
        {
          path: 'about',
          name: 'app_About',
          component: () => import('../views/app/About.vue'),
          meta: {
            isSider: false
          }
        },
        {
          path: 'info',
          name: 'app_info',
          component: () => import('../views/app/Info.vue'),
          meta: {
            isSider: false
          }
        }
      ]
    },
    {
      path: '/user',
      name: 'appuser',
      component: () => import('../views/app/User.vue'),
      meta: {
        isSider: true
      }
    },
  ]
})

export default router
